//: [Previous](@previous)

import Foundation

enum CompassPoint {
    case north
    
    case south
    
    case east
    
    case west
}

enum Planet {
    case mercury, venus, earth, mars, jupiter, saturn, uranus, neptune
}

var directionToHead = CompassPoint.west

directionToHead = .east

// MARK: Associated Values
enum Barcode {
    case upc(Int, Int, Int, Int)
    
    case qrCode(String)
}

var productBarCode = Barcode.upc(8, 85909, 51226, 3)

productBarCode = Barcode.qrCode("ABCDEFGHIJKLMNOP")

switch productBarCode {
case .upc(let numberSystem, let manufacturer, let product, let check):
    print("UPC:\(numberSystem),\(manufacturer),\(product),\(check)")
case .qrCode(let productCode):
    print("QR code:\(productCode)")
}

switch productBarCode {
case let .upc(numberSystem, manufacturer, product, check):
    print("UPC:\(numberSystem),\(manufacturer),\(product),\(check)")
case let .qrCode(productCode):
    print("QR code:\(productCode)")
}


enum Gender: Int {
    case male = 1, famale
}

let jack = Gender(rawValue: 1)

print(jack)

// MARK: Recursive Enumerations  
